package com.ruoyi.answerRecord.domain;

import java.time.LocalDate;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户答题记录管理对象 user_quiz_answer_record
 * 
 * @author amy
 * @date 2025-06-12
 */
@Schema(description = "用户答题记录管理对象")
public class UserQuizAnswerRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;


    /** 自增ID */
    @Schema(title = "自增ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /** 逻辑主键-答题记录编码 */
    @Schema(title = "逻辑主键-答题记录编码")
    private String recordCode;

    /** 答题用户ID */
    @Schema(title = "答题用户ID")
    @Excel(name = "答题用户ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    /** 题目ID */
    @Schema(title = "题目ID")
    @Excel(name = "题目ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long questionId;

    /** 圈子ID */
    @Schema(title = "圈子ID")
    @Excel(name = "圈子ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long circleId;

    /** 用户答案JSON数组 */
    @Schema(title = "用户答案JSON数组")
    @Excel(name = "用户答案JSON数组")
    private String userAnswer;

    /** 是否答对 0-错误 1-正确 */
    @Schema(title = "是否答对 0-错误 1-正确")
    @Excel(name = "是否答对 0-错误 1-正确")
    private Long isCorrect;

    /** 获得积分数量 */
    @Schema(title = "获得积分数量")
    @Excel(name = "获得积分数量")
    private Long pointsEarned;

    /** 答题时间 */
    @Schema(title = "答题时间")
    @Excel(name = "答题时间")
    private LocalDate answerTime;

    /** 答题用时(秒) */
    @Schema(title = "答题用时(秒)")
    @Excel(name = "答题用时(秒)")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long timeSpent;

    /** 创建人 */
    @Schema(title = "创建人")
    private String createdBy;

    /** 创建时间 */
    @Schema(title = "创建时间")
    private LocalDate createdTime;

    /** 更新人 */
    @Schema(title = "更新人")
    private String updatedBy;

    /** 更新时间 */
    @Schema(title = "更新时间")
    private LocalDate updatedTime;

    /** 删除标志 0-未删除 1-已删除 */
    @Schema(title = "删除标志 0-未删除 1-已删除")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long deletedFlag;
    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }


    public void setRecordCode(String recordCode) 
    {
        this.recordCode = recordCode;
    }

    public String getRecordCode() 
    {
        return recordCode;
    }


    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }


    public void setQuestionId(Long questionId) 
    {
        this.questionId = questionId;
    }

    public Long getQuestionId() 
    {
        return questionId;
    }


    public void setCircleId(Long circleId) 
    {
        this.circleId = circleId;
    }

    public Long getCircleId() 
    {
        return circleId;
    }


    public void setUserAnswer(String userAnswer) 
    {
        this.userAnswer = userAnswer;
    }

    public String getUserAnswer() 
    {
        return userAnswer;
    }


    public void setIsCorrect(Long isCorrect) 
    {
        this.isCorrect = isCorrect;
    }

    public Long getIsCorrect() 
    {
        return isCorrect;
    }


    public void setPointsEarned(Long pointsEarned) 
    {
        this.pointsEarned = pointsEarned;
    }

    public Long getPointsEarned() 
    {
        return pointsEarned;
    }


    public void setAnswerTime(LocalDate answerTime) 
    {
        this.answerTime = answerTime;
    }

    public LocalDate getAnswerTime() 
    {
        return answerTime;
    }


    public void setTimeSpent(Long timeSpent) 
    {
        this.timeSpent = timeSpent;
    }

    public Long getTimeSpent() 
    {
        return timeSpent;
    }


    public void setCreatedBy(String createdBy) 
    {
        this.createdBy = createdBy;
    }

    public String getCreatedBy() 
    {
        return createdBy;
    }


    public void setCreatedTime(LocalDate createdTime) 
    {
        this.createdTime = createdTime;
    }

    public LocalDate getCreatedTime() 
    {
        return createdTime;
    }


    public void setUpdatedBy(String updatedBy) 
    {
        this.updatedBy = updatedBy;
    }

    public String getUpdatedBy() 
    {
        return updatedBy;
    }


    public void setUpdatedTime(LocalDate updatedTime) 
    {
        this.updatedTime = updatedTime;
    }

    public LocalDate getUpdatedTime() 
    {
        return updatedTime;
    }


    public void setDeletedFlag(Long deletedFlag) 
    {
        this.deletedFlag = deletedFlag;
    }

    public Long getDeletedFlag() 
    {
        return deletedFlag;
    }



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("recordCode", getRecordCode())
            .append("userId", getUserId())
            .append("questionId", getQuestionId())
            .append("circleId", getCircleId())
            .append("userAnswer", getUserAnswer())
            .append("isCorrect", getIsCorrect())
            .append("pointsEarned", getPointsEarned())
            .append("answerTime", getAnswerTime())
            .append("timeSpent", getTimeSpent())
            .append("createdBy", getCreatedBy())
            .append("createdTime", getCreatedTime())
            .append("updatedBy", getUpdatedBy())
            .append("updatedTime", getUpdatedTime())
            .append("deletedFlag", getDeletedFlag())
            .toString();
    }
}
